<%@page contentType="text/html"%>

<%@page pageEncoding="UTF-8"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <title>Tela Cadastro - Artigo Manoel Pimentel</title>

    </head>

<body>
 <c:catch var="ex">
 
 <sql:transaction dataSource="${ds}">   
 
 <sql:update var="gravaCli">

                    insert into CLIENTES (CODIGO,NOME,CPF,RG,TELEFONE,EMAIL,ESTADO) 

                    values(?,?,?,?,?,?,?)

                    <sql:param value="${param['edtCodigo']}"/>

                    <sql:param value="${param['edtNome']}"/>

                    <sql:param value="${param['edtCPF']}"/>

                    <sql:param value="${param['edtRG']}"/>            

                    <sql:param value="${param['edtTelefone']}"/>

                    <sql:param value="${param['edtEmail']}"/> 

                    <sql:param value="${param['cmbEstados']}"/> 

                   

                </sql:update>

            </sql:transaction>

        </c:catch>

<h1>   

            <c:out value="${ex}" default="Gravação executada com sucesso!"/>

        </h1>

       <hr>

        <input type="button" value="Voltar" name="btnVoltar" onclick="history.back();">

     </body>

</html>
